package com.xianggu.spring.aop.strategy;

import com.xianggu.spring.aop.enums.PointcutEnum;

/**
 * @author chengjy
 * @date 2025/3/10
 */
public class PointStrategyFactory {
    public static PointStrategy getPointStrategy(PointcutEnum pointcutEnum, String path){
        switch (pointcutEnum){
            case EXECUTION:
                return new ExecutionPointStrategy(path);
            case ANNOTATION:
                return new AnnotationPointStrategy(path);
            case WITHIN:
                return new WithinPointStrategy(path);
            default:
                return null;
        }
    }
}
